Registration in a de-coupled environment

ABSTRACT

A method, system and computer program product for registration in a de-coupled environment or system may include providing an identity of a spawned component to a manager. The method, system and computer program product may also include taking a predetermined action in response to the spawned component failing to report its status to the manager after a preset time period.

BACKGROUND OF THE INVENTION

The present invention relates to systems where components are de-coupledor do not communicate directly with one another, and more particularlyto a method and system for registration in a de-coupled environment orsystem.

In a purely decoupled environment, components are unaware of each other.There is no exchange of state information directly between controlledcomponents. The operation of each component occurs in a completely‘stand alone, pluggable’ fashion. Existing components can be removed ornew components can be added to the system without affecting any otherexisting component. Each component operates independently and has adirect interface only to a central manager or controller. No otherformal interface is required between sibling components. Each componentreports status to and receives status from the manager. The managerbroadcasts state and transition information to all registeredcomponents. Each component takes its appropriate action and reports backto the manager.

Many such systems may use the concept of a listener. In these systems,components may register with the manager to ‘listen for’ events or othermessages of interest. In current de-coupled systems, there is no meansto ensure that a component expected to publish or broadcast an event ormessage is, in fact, alive and capable of doing so. Quite possibly,components may be listening for events or messages that can never happenbecause the would-be source has failed to initialize or start. Othercomponents that are listening will never know that a required componentis not there. Without some means to guarantee registration, there is noway for the manager to know about failed components.

BRIEF SUMMARY OF THE INVENTION

In accordance with an embodiment of the present invention, a method forregistration in a de-coupled environment or system may include providingan identity of a spawned component to a manager, controller or the like.The method may also include taking a predetermined action in response tothe spawned component failing to report its status to the manager orcontroller after a preset time period.

In accordance with another embodiment of the present invention, a systemfor registration in a de-coupled environment or system may include acomponent adapted to provide an identity of a spawned component. Thesystem may also include a manager, controller or the like adapted toreceive the identity of the spawned component and to take apredetermined action in response to the spawned component failing toreport its status after a predetermined time period.

In accordance with another embodiment of the present invention, acomputer program product for registration in a de-coupled environmentmay include a computer useable medium having computer useable programcode embodied therein. The computer useable medium may include computeruseable program code configured to provide an identity of a spawnedcomponent to a manager, controller or the like. The computer useablemedium may also include computer useable program code configured to takea predetermined action in response to the spawned component failing toreport its status to the manager after a preset time period.

Other aspects and features of the present invention, as defined solelyby the claims, will become apparent to those ordinarily skilled in theart upon review of the following non-limited detailed description of theinvention in conjunction with the accompanying figures.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

FIG. 1 is a flow chart of an example of a method for registration in ade-coupled environment or system in accordance with an embodiment of thepresent invention.

FIG. 2 is a block schematic diagram of an exemplary system forregistering components in a de-coupled environment in accordance with anembodiment of the present invention.

FIG. 3 is a block schematic diagram of another exemplary system forregistering components in a de-coupled environment in accordance withanother embodiment of the present invention.

FIG. 4 is an example of a state machine illustrating operation of thesystem of FIG. 3.

DETAILED DESCRIPTION OF THE INVENTION

The following detailed description of embodiments refers to theaccompanying drawings, which illustrate specific embodiments of theinvention. Other embodiments having different structures and operationsdo not depart from the scope of the present invention.

As will be appreciated by one of skill in the art, the present inventionmay be embodied as a method, system, or computer program product.Accordingly, the present invention may take the form of an entirelyhardware embodiment, an entirely software embodiment (includingfirmware, resident software, micro-code, etc.) or an embodimentcombining software and hardware aspects that may all generally bereferred to herein as a “circuit,” “module” or “system.” Furthermore,the present invention may take the form of a computer program product ona computer-usable storage medium having computer-usable program codeembodied in the medium.

Any suitable computer useable medium may be utilized. Thecomputer-usable or computer-readable medium may be, for example but notlimited to, an electronic, magnetic, optical, electromagnetic, infrared,or semiconductor system, apparatus, device, or propagation medium. Morespecific examples (a non-exhaustive list) of the computer-readablemedium would include the following: an electrical connection having oneor more wires, a portable computer diskette, a hard disk, a randomaccess memory (RAM), a read-only memory (ROM), an erasable programmableread-only memory (EPROM or Flash memory), an optical fiber, a portablecompact disc read-only memory (CD-ROM), an optical storage device, atransmission media such as those supporting the Internet or an intranet,or a magnetic storage device. Note that the computer-usable orcomputer-readable medium could even be paper or another suitable mediumupon which the program is printed, as the program can be electronicallycaptured, via, for instance, optical scanning of the paper or othermedium, then compiled, interpreted, or otherwise processed in a suitablemanner, if necessary, and then stored in a computer memory. In thecontext of this document, a computer-usable or computer-readable mediummay be any medium that can contain, store, communicate, propagate, ortransport the program for use by or in connection with the instructionexecution system, apparatus, or device.

Computer program code for carrying out operations of the presentinvention may be written in an object oriented programming language suchas Java, Smalltalk, C++ or the like. However, the computer program codefor carrying out operations of the present invention may also be writtenin conventional procedural programming languages, such as the “C”programming language or similar programming languages. The program codemay execute entirely on the user's computer, partly on the user'scomputer, as a stand-alone software package, partly on the user'scomputer and partly on a remote computer or entirely on the remotecomputer or server. In the latter scenario, the remote computer may beconnected to the user's computer through a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

The present invention is described below with reference to flowchartillustrations and/or block diagrams of methods, apparatus (systems) andcomputer program products according to embodiments of the invention. Itwill be understood that each block of the flowchart illustrations and/orblock diagrams, and combinations of blocks in the flowchartillustrations and/or block diagrams, can be implemented by computerprogram instructions. These computer program instructions may beprovided to a processor of a general purpose computer, special purposecomputer, or other programmable data processing apparatus to produce amachine, such that the instructions, which execute via the processor ofthe computer or other programmable data processing apparatus, createmeans for implementing the functions/acts specified in the flowchartand/or block diagram block or blocks.

These computer program instructions may also be stored in acomputer-readable memory that can direct a computer or otherprogrammable data processing apparatus to function in a particularmanner, such that the instructions stored in the computer-readablememory produce an article of manufacture including instruction meanswhich implement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer orother programmable data processing apparatus to cause a series ofoperational steps to be performed on the computer or other programmableapparatus to produce a computer implemented process such that theinstructions which execute on the computer or other programmableapparatus provide steps for implementing the functions/acts specified inthe flowchart and/or block diagram block or blocks.

FIG. 1 is a flow chart of an example of a method 100 for registration ina de-coupled environment or system in accordance with an embodiment ofthe present invention. In block 102, a parent component may report anintention to create a spawned component to a manager. The manager may beany component of a system that receives messages and events from othercomponents and broadcasts messages and events to other components whichhave registered with the manager in a system. The manager may be acontroller, graphical user interface (GUI) listener,publication/subscription recipient or similar device orcomputer-executable code. A parent component may be any component thatforms part of a de-coupled system and a spawned component may be anycomponent that is created or spawned by another component in ade-coupled system or environment. Examples of a parent component andspawned component may include spawned threads, spawned processes or thelike. In block 104, a parent component or computer-executable codeincluded in the parent component may create or spawn the component.

In block 106, the parent component or code may inform the manager of anidentity of the spawned component. A message or signal may be sent fromthe parent component to the manager including the identity of thespawned component or child component to be spawned. The operations ofblocks 104 and 106 may be performed in any order. In block 108, thespawned component may initialize itself.

In block 110, a determination may be made whether the spawned componentsuccessfully started. If the spawned component failed to start, themethod 100 may advance to block 112. In block 112, the manager may timeout in response to not receiving a status from the spawned componentafter a preset time period. The manager may also take a predeterminedaction in response to timing out or not receiving the status indicationfrom the spawned component after the preset time period. Thepredetermined action or actions may include halting the system, notallowing mainline processing by the system, advising other activecomponents of the failure, attempting corrective action or similaractions.

If the spawned component successfully starts in block 110, the spawnedcomponent reports its status to the manager in block 114. No furtherinteraction may be required between the spawned component and the parentcomponent. Although, such interaction may occur under some circumstancesor in some systems. The spawned component may also register with themanager in order to be included in the system and to receive messages ornotice of events from the manager.

In block 116, mainline processing may be allowed in response to allmonitored components being healthy and registered with the manager. Themonitored components may include all parent and spawned components.

FIG. 2 is a block schematic diagram of an exemplary system 200 forregistering components in a de-coupled environment in accordance with anembodiment of the present invention. The method 100 may be embodied inand performed by the system 200. The system 200 may include a manager202, such as a state manager, controller, graphical user interface (GUI)listener, publication/subscription recipient or the like. The manager202 may include an observable interface, such as a Java observableinterface or the like. An observable interface or observable object maybe any object whose state may be of interest, and in whom other objectsor components may register an interest. The manager 202 may be operableon a processor 204, gateway or similar device, software system, hardwaresystem or combination of these.

The system 200 may also include one or more components, such ascomponent I 206 and component N 208. As previously discussed a componentmay be any part of a de-coupled system. Each component may include anobserver interface, such as a Java observer interface or the like, topermit the component to be notified when a state of another componentchanges or some other occurrence that may affect the component. Eachcomponent 206 and 208 may spawn or create one or more child or spawnedcomponents 210-216 or may not spawn or create any child or spawnedcomponents. For example, component I 206 may create spawned componentsI_(i)-I_(n) 210-212 and component N 208 may create spawned componentsN_(i)-N_(n) 214-216. As discussed with respect to method 100 in FIG. 1,each parent component 206 and 208 reports an intention to create aspawned component 210-216 to the manager 202. The parent component 206or 208 then creates each spawned component 210-216. The parent component206 or 208 also informs the manager 202 of the identity of each spawnedcomponent 210-216. Each spawned component may also include an observerinterface.

Each spawned component 210-216 may initialize itself and then report astatus to the manager 202 as discussed with reference to block 114 inFIG. 1. If any of the spawned components 210-216 fail to start, themanager 202 may perform a predetermined action in response to notreceiving a status from any of the spawned components 210-216 after apreset time period as previously discussed with respect to FIG. 1.

FIG. 3 is a block schematic diagram of another exemplary system 300 forregistering components in a de-coupled environment in accordance withanother embodiment of the present invention. The system 300 is anillustration of an X25 Gateway State Manager and observers or componentsthat may be used for a Clearing House Interbank Payments System (CHIPS)or the like. CHIPS is a premier bank-owned payments system for clearinglarge value payments. A gateway 302 may include a state manager 304. Theinteraction of the state manager 304 with other ‘state aware’ subsystemsin the gateway 302 or system 300 is illustrated in FIG. 3. The statemanager 304 may transmit a gateway (GW) state 306 to all components308-322 or observers by an update broadcast 324. The gateway design andimplementation may control the state of the different observers orcomponents 308-322 by using instances of classes that implementobservable and observer interfaces, such as Java observable and observerinterfaces or similar interfaces.

As each parent component, such as gateway 302 or CHIPs request processor308 are about to create and start a spawned component 310-322, theparent component or parent component code informs the state manager 304of the name of the spawned component 310-322, similar to that previouslydescribed with respect to method 100 of FIG. 1. When the spawnedcomponent 310-322 initializes itself and processing in the componentgets to a point where the component is successfully started, the spawnedcomponent 310-322 reports its status to the state manager 304. If thespawned component 310-322 fails at startup in such a way that it cannotreport status, the state manager 304 times out waiting for status fromthe spawned component 310-322 and may begin a halt process to stop thesystem 300. Queues may be used to pass state information 326 and statusinformation 328 to the state manager 302.

Referring also to FIG. 4, FIG. 4 is an example of a state machine 400illustrating operation of the system 300 of FIG. 3. In block 402, thesystem 300 is starting. Gateway Main 302 may create a configurationmanager 310 and obtain configuration for the system 300. The statemanager 304, a command processor 312, common or gateway writers 314 andCHIPs request processor 308 may be created. The state manager 304 waitsuntil all components report initialization.

In block 404, the state manager 304 issues an initialized statenotification and may issue an activate command. The command writer 314and a command reader 316 are activated. In block 406, the state manager304 may issue a command activated state notification in response to thecommand or GW writers 314 and command reader 316 reporting activation.The state manager 304 monitors all readers 316, 318 and writers 314, aconnection manager 320 and the CHIPs request processor 308 via statequeues 326. If any component reports being stopped, the system 300 isstopped and state manager 304 issues a stopping state notification andthe gateway 302 is in a controlled stop state in block 408. The system300, including all subsystems, is in a stopped state in block 410.

The connection manager 304 moves to a disconnected state in response tothe connection manager 320 reporting being disconnected. The statemanager 304 issues a disconnected state notification and all connectionsare inactive in the disconnected state in block 412.

In block 414, the state manager 304 may issue a connection statenotification in response to at least one connection being active. Thestate machine 400 may return to block 412 in response to the connectionmanager 320 reporting a disconnect and the state machine 400 may proceedas previously described.

In block 416, the state manager 304 may issue an enable notification.The system 300 is in an enabled state in response to the CHIPs reader318 and writers 314 reporting being enabled. The state machine 400 mayreturn to block 412 in response to the connection manager 304 reportinga disconnect. The state machine 400 may then proceed and previouslydescribed.

The flowcharts and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, can be implemented by special purpose hardware-basedsystems which perform the specified functions or acts, or combinationsof special purpose hardware and computer instructions.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the invention. Asused herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising,” when used in this specification, specify thepresence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneor more other features, integers, steps, operations, elements,components, and/or groups thereof.

Although specific embodiments have been illustrated and describedherein, those of ordinary skill in the art appreciate that anyarrangement which is calculated to achieve the same purpose may besubstituted for the specific embodiments shown and that the inventionhas other applications in other environments. This application isintended to cover any adaptations or variations of the presentinvention. The following claims are in no way intended to limit thescope of the invention to the specific embodiments described herein.

1. A method for registration in a de-coupled environment, comprising:providing an identity of a spawned component to a manager by a parentcomponent that spawns the spawned component; and taking a predeterminedaction in response to the spawned component failing to report its statusto the manager after a preset time period.
 2. The method of claim 1,further comprising initializing the spawned component; and reporting astatus of the spawned component in response to the spawned componentsuccessfully starting.
 3. The method of claim 1, further comprisingregistering the spawned component with the manager in order to includethe spawned component in a system.
 4. The method of claim 1, furthercomprising allowing mainline processing in response to all monitoredcomponents of a plurality of components being healthy and registeredwith the manager.
 5. The method of claim 1, further comprising reportingan intention to create the spawned component from the parent componentto the manager, wherein the manager comprises an observable interfaceand the parent component comprises an observer interface.
 6. The methodof claim 5, further comprising the parent component creating the spawnedcomponent and wherein the parent component provides the identity of thespawned component to the manager.
 7. The method of claim 6, furthercomprising the spawned component reporting its status to the manager inresponse to successfully starting.
 8. A system for registration in ade-coupled environment, comprising: a component adapted to provide anidentity of a spawned component, wherein the spawned component isspawned by the component; and a manager adapted to receive the identityof the spawned component from the component that spawned the spawnedcomponent and to take a predetermined action in response to the spawnedcomponent failing to report its status after a preset time period. 9.The system of claim 8, wherein the component and the spawned componenteach comprise an observer interface and wherein the manager comprises anobservable interface.
 10. The system of claim 8, wherein the managercomprises one of a state manager, a GUI listener, a gateway and apublication/subscription recipient.
 11. The system of claim 8, whereinthe spawned component is adapted to report its status to the manager inresponse to successfully starting.
 12. The system of claim 8, whereinthe manager is adapted to allow mainline processing in response to allmonitored components of a plurality of components being healthy andregistered with the manager.
 13. A computer program product forregistration in a de-coupled environment, the computer program productcomprising: a computer useable medium having computer useable programcode embodied therein, the computer useable medium comprising: computeruseable program code configured to provide an identity of a spawnedcomponent to a manager by a parent component that spawns the spawnedcomponent; and computer useable program code configured to take apredetermined action in response to the spawned component failing toreport its status to the manager after a preset time period.
 14. Thecomputer program product of claim 13, further comprising: computeruseable program code configured to initialize the spawned component; andcomputer useable program code configured to report a status of thespawned component in response to the spawned component successfullystarting.
 15. The computer program product of claim 13, furthercomprising computer useable program code configured to register thespawned component with the manager in order to include the spawnedcomponent in a system.
 16. The computer program product of claim 13,further comprising computer useable program code configured to allowmainline processing in response to all monitored components of aplurality of components being healthy and registered with the manager.17. The computer program product of claim 13, further comprisingcomputer useable program code configured to report an intention tocreate the spawned component from the parent component to the manager,wherein the manager comprises an observable interface and the parentcomponent comprises an observer interface.
 18. The computer programproduct of claim 17, further comprising computer useable program codeconfigured to report a status from the spawned component to the managerin response to the spawned component successfully starting.